import { request } from '@/utils/request.js'

/**
 * 导出对象 API JS
 */

export default {

    /**
     * 获取导出对象分页列表
     * @returns
     */
    getList (params = {}) {
        return request({
            url: 'template/excelObject/index',
            method: 'get',
            params
        })
    },
    dtoFields (params = {}) {
        return request({
            url: 'template/excelObject/dtoFields',
            method: 'get',
            params
        })
    },

    /**
     * 添加导出对象
     * @returns
     */
    save (data = {}) {
        return request({
            url: 'template/excelObject/save',
            method: 'post',
            data
        })
    },

    /**
     * 更新导出对象数据
     * @returns
     */
    update (id, data = {}) {
        return request({
            url: 'template/excelObject/update/' + id,
            method: 'put',
            data
        })
    },

    /**
     * 读取导出对象
     * @returns
     */
    read (id) {
        return request({
            url: 'template/excelObject/read/' + id,
            method: 'get',
        })
    },

    /**
     * 将导出对象删除，有软删除则移动到回收站
     * @returns
     */
    deletes (data) {
        return request({
            url: 'template/excelObject/delete',
            method: 'delete',
            data
        })
    },


}